local zong__posui = fk.CreateSkill {
  name = "zong__posui",
  tags = {Skill.Wake},
}

Fk:loadTranslationTable{
  ["zong__posui"] = "破碎",
  [":zong__posui"] = "觉醒技，当其他角色死亡后，你失去1点体力，然后加1点体力上限。",
}

zong__posui:addEffect(fk.Death, {
  anim_type = "wake",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(zong__posui.name) 
      and target ~= player 
      and player:usedSkillTimes(zong__posui.name, Player.HistoryGame) == 0
  end,
  can_wake = function(self, event, target, player, data)
    return true
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    
    room:loseHp(player, 1, zong__posui.name)
    
    if player.dead then 
      room:notifySkillInvoked(player, zong__posui.name, "wake_fail")
      return false 
    end

    room:changeMaxHp(player, 1)
  end,
})

return zong__posui